package com.blackcat.config;

import com.blackcat.core.MusicTagReader;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

/**
 * 启动jar运行
 * @author : zhangdahui  2024/9/6 下午3:49
 */
@Component
public class StartRunner  implements ApplicationRunner {

    @Autowired
    private MusicTagReader musicTagReader;

    @Override
    public void run(ApplicationArguments args) {
        startMethod();
    }

    public void startMethod(){
        musicTagReader.start();
    }

}
